home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIProxyInfo.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  205 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIProxyInfo.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIProxyInfo_h__
  6. #define __gen_nsIProxyInfo_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIProxyInfo */
  19. #define NS_IPROXYINFO_IID_STR "3fe9308b-1608-4fa0-933c-c5ec2c6175fd"
  20.  
  21. #define NS_IPROXYINFO_IID \
  22.   {0x3fe9308b, 0x1608, 0x4fa0, \
  23.     { 0x93, 0x3c, 0xc5, 0xec, 0x2c, 0x61, 0x75, 0xfd }}
  24.  
  25. /**
  26.  * This interface identifies a proxy server.
  27.  *
  28.  * @status UNDER_REVIEW
  29.  */
  30. class NS_NO_VTABLE nsIProxyInfo : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYINFO_IID)
  34.  
  35.   /**
  36.    * This attribute specifies the hostname of the proxy server.
  37.    */
  38.   /* readonly attribute AUTF8String host; */
  39.   NS_IMETHOD GetHost(nsACString & aHost) = 0;
  40.  
  41.   /**
  42.    * This attribute specifies the port number of the proxy server.
  43.    */
  44.   /* readonly attribute long port; */
  45.   NS_IMETHOD GetPort(PRInt32 *aPort) = 0;
  46.  
  47.   /**
  48.    * This attribute specifies the type of the proxy server as an ASCII string.
  49.    *
  50.    * Some special values for this attribute include (but are not limited to)
  51.    * the following:
  52.    *   "http"     HTTP proxy (or SSL CONNECT for HTTPS)
  53.    *   "socks"    SOCKS v5 proxy
  54.    *   "socks4"   SOCKS v4 proxy
  55.    *   "direct"   no proxy
  56.    *   "unknown"  unknown proxy (see nsIProtocolProxyService::resolve)
  57.    */
  58.   /* readonly attribute ACString type; */
  59.   NS_IMETHOD GetType(nsACString & aType) = 0;
  60.  
  61.   /**
  62.    * This attribute specifies flags that modify the proxy type.  The value of
  63.    * this attribute is the bit-wise combination of the Proxy Flags defined
  64.    * below.  Any undefined bits are reserved for future use.
  65.    */
  66.   /* readonly attribute unsigned long flags; */
  67.   NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0;
  68.  
  69.   /**
  70.    * This attribute specifies the failover timeout in seconds for this proxy.
  71.    * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
  72.    * getFailoverForProxy, then the failed proxy will not be used again for this
  73.    * many seconds.
  74.    */
  75.   /* readonly attribute unsigned long failoverTimeout; */
  76.   NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) = 0;
  77.  
  78.   /**
  79.    * This attribute specifies the proxy to failover to when this proxy fails.
  80.    */
  81.   /* attribute nsIProxyInfo failoverProxy; */
  82.   NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) = 0;
  83.   NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) = 0;
  84.  
  85.   /****************************************************************************
  86.    * The following "Proxy Flags" may be bit-wise combined to construct the flags
  87.    * attribute defined on this interface.
  88.    */
  89. /**
  90.    * This flag is set if the proxy is to perform name resolution itself.  If
  91.    * this is the case, the hostname is used in some fashion, and we shouldn't
  92.    * do any form of DNS lookup ourselves.
  93.    */
  94.   enum { TRANSPARENT_PROXY_RESOLVES_HOST = 1U };
  95.  
  96. };
  97.  
  98. /* Use this macro when declaring classes that implement this interface. */
  99. #define NS_DECL_NSIPROXYINFO \
  100.   NS_IMETHOD GetHost(nsACString & aHost); \
  101.   NS_IMETHOD GetPort(PRInt32 *aPort); \
  102.   NS_IMETHOD GetType(nsACString & aType); \
  103.   NS_IMETHOD GetFlags(PRUint32 *aFlags); \
  104.   NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout); \
  105.   NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy); \
  106.   NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy); \
  107.  
  108. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  109. #define NS_FORWARD_NSIPROXYINFO(_to) \
  110.   NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \
  111.   NS_IMETHOD GetPort(PRInt32 *aPort) { return _to GetPort(aPort); } \
  112.   NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \
  113.   NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \
  114.   NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return _to GetFailoverTimeout(aFailoverTimeout); } \
  115.   NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return _to GetFailoverProxy(aFailoverProxy); } \
  116.   NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return _to SetFailoverProxy(aFailoverProxy); } \
  117.  
  118. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  119. #define NS_FORWARD_SAFE_NSIPROXYINFO(_to) \
  120.   NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
  121.   NS_IMETHOD GetPort(PRInt32 *aPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
  122.   NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  123.   NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  124.   NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverTimeout(aFailoverTimeout); } \
  125.   NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverProxy(aFailoverProxy); } \
  126.   NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFailoverProxy(aFailoverProxy); } \
  127.  
  128. #if 0
  129. /* Use the code below as a template for the implementation class for this interface. */
  130.  
  131. /* Header file */
  132. class nsProxyInfo : public nsIProxyInfo
  133. {
  134. public:
  135.   NS_DECL_ISUPPORTS
  136.   NS_DECL_NSIPROXYINFO
  137.  
  138.   nsProxyInfo();
  139.  
  140. private:
  141.   ~nsProxyInfo();
  142.  
  143. protected:
  144.   /* additional members */
  145. };
  146.  
  147. /* Implementation file */
  148. NS_IMPL_ISUPPORTS1(nsProxyInfo, nsIProxyInfo)
  149.  
  150. nsProxyInfo::nsProxyInfo()
  151. {
  152.   /* member initializers and constructor code */
  153. }
  154.  
  155. nsProxyInfo::~nsProxyInfo()
  156. {
  157.   /* destructor code */
  158. }
  159.  
  160. /* readonly attribute AUTF8String host; */
  161. NS_IMETHODIMP nsProxyInfo::GetHost(nsACString & aHost)
  162. {
  163.     return NS_ERROR_NOT_IMPLEMENTED;
  164. }
  165.  
  166. /* readonly attribute long port; */
  167. NS_IMETHODIMP nsProxyInfo::GetPort(PRInt32 *aPort)
  168. {
  169.     return NS_ERROR_NOT_IMPLEMENTED;
  170. }
  171.  
  172. /* readonly attribute ACString type; */
  173. NS_IMETHODIMP nsProxyInfo::GetType(nsACString & aType)
  174. {
  175.     return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177.  
  178. /* readonly attribute unsigned long flags; */
  179. NS_IMETHODIMP nsProxyInfo::GetFlags(PRUint32 *aFlags)
  180. {
  181.     return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183.  
  184. /* readonly attribute unsigned long failoverTimeout; */
  185. NS_IMETHODIMP nsProxyInfo::GetFailoverTimeout(PRUint32 *aFailoverTimeout)
  186. {
  187.     return NS_ERROR_NOT_IMPLEMENTED;
  188. }
  189.  
  190. /* attribute nsIProxyInfo failoverProxy; */
  191. NS_IMETHODIMP nsProxyInfo::GetFailoverProxy(nsIProxyInfo * *aFailoverProxy)
  192. {
  193.     return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195. NS_IMETHODIMP nsProxyInfo::SetFailoverProxy(nsIProxyInfo * aFailoverProxy)
  196. {
  197.     return NS_ERROR_NOT_IMPLEMENTED;
  198. }
  199.  
  200. /* End of implementation class template. */
  201. #endif
  202.  
  203.  
  204. #endif /* __gen_nsIProxyInfo_h__ */
  205.